package com.ecar.common.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class LoadProperty {
	
	private static final String PROPERTY_PATH = "debug/config.properties";
	
	public static String loadProperty(String key) {

		Properties pps = new Properties();
		try {
			InputStream in =Thread.currentThread().getContextClassLoader().getResourceAsStream(PROPERTY_PATH);//获取路径并转换成流
			pps.load(in);
			
			return pps.getProperty(key);
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}

}
